import time
import uuid
import hashlib

# 填写你的参数
DomainName = "www.lhlhal.com"
Filename = "/login"
pushAKey = "abcdefg"

# 生成随机数和时间戳
rand = uuid.uuid4().hex
timestamp = int(time.time())
print(timestamp)

# 拼接字符串计算MD5
sstring = f"{Filename}-{timestamp}-0-0-{pushAKey}"
md5hash = hashlib.md5(sstring.encode()).hexdigest()

# 构建鉴权URL
Url = f"http://{DomainName}{Filename}?auth_key={timestamp}-0-0-{md5hash}"

print(Url)